from django.conf.urls.defaults import *

urlpatterns = patterns('tj3.views',
	url(r'^$','home',name='home'),
	url(r'^calendar/(?P<year>\d+)/(?P<month>\d+)/$','calendar', name='calendar'),

	# task 
	url(r'^task/manage/$','task_manage',name='task_manage'),
	url(r'^task/create/$','task_create',name='task_create'),
	url(r'^task/display/$','task_display',name='task_display'),	
	url(r'^task/display/tjp/$','task_display_tjp',name='task_display_tjp'),
	url(r'^task/move/(?P<proj_id>\d+)/(?P<task_id>\d+)/$','task_move',name='task_move'),	
	url(r'^task/detail/(?P<task_id>\d+)/$','task_detail',name='task_detail'),

	# booking
	url(r'^booking/(?P<task_id>\d+)/(?P<resource_id>\d+)/$','booking_create',name='booking_create'),
	url(r'^booking/(?P<booking_id>\d+)/$','booking_edit',name='booking_edit'),
    
    # journal
	url(r'^journal/display/$', 'journal_display',name='journal_display'),
	(r'^journal/display/tji/$','journal_display_tji'),
	url(r'^journal/(?P<journal_id>\d+)/$','journal_edit',name='journal_edit'),
	url(r'^journal/create/(?P<booking_id>\d+)/$','journal_create',name='journal_create'),
	
	# task period
    url(r'^period/create/(?P<task_id>\d+)/$','period_create',name='period_create'),
	url(r'^period/edit/(\d+)/$','period_edit',name='period_edit'),

	# task dependency
	url(r'^dep/create/(?P<task_id>\d+)/$','dep_create',name='dep_create'),
	url(r'^dep/edit/(\d+)/$','dep_edit',name='dep_edit'),

	# resource allocation
	url(r'^resource/allocate/(?P<task_id>\d+)/$','resource_allocate',name='resource_allocate'),
	url(r'^resource/allocate/(\d+)/$','resource_allocate_edit',name='resource_allocate_edit'),
	
	# resource
	url(r'^resource/(\d+)/$','resource_edit',name='resource_edit'),	
	url(r'^resource/display/$','resource_display',name='resource_display'),
	url(r'^resource/create/$','resource_create',name='resource_create'),

	# worklimit
	url(r'^worklimit/edit/(\d+)/$','worklimit_edit',name='worklimit_edit'),

	# timeoff
	url(r'^timeoff/create/(?P<resource_id>\d+)/$', 'timeoff_create',name='timeoff_create'),

	# import freemind
	url(r'^import/freemind/$', 'import_freemind',name='import_freemind'),
	url(r'^export/freemind/$', 'export_freemind',name='export_freemind'),

	# import MPP
	url(r'^import/mpp/$', 'import_mpp',name='import_mpp'),
	
	# compile TJ
	url(r'^project/compile/$', 'project_compile',name='project_compile'),
)
